package com.dwxt.cdms.dao;

import com.dwxt.cdms.applets.dto.IndexGraphDayResDTO;
import com.dwxt.cdms.applets.dto.IndexGraphResDTO;
import com.dwxt.cdms.applets.dto.IndexReqDTO;
import com.dwxt.cdms.entity.BloodSugar;
import com.dwxt.cdms.entity.Customer;
import com.dwxt.cdms.entity.vo.BloodSugarCustom;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BloodSugarMapper extends Mapper<BloodSugar> {

    int deleteBloodSugarByCustomerIds(@Param("customerIds") Integer[] customerIds);

    List<BloodSugarCustom> selectSugarPage(@Param("customer") Customer customer, @Param("isAbnormal") Integer isAbnormal,
                                           @Param("start") String start, @Param("end") String end,
                                           @Param("customerId") String customerId,@Param("partId") String partId);

    int replaceBindingAiAoLeUser(@Param("customerId") Integer customerId, @Param("serialNumber") String serialNumber);

    List<BloodSugar> selectBloodSugarBySerialNumberAndcheckTime(BloodSugar bloodSugar);

    List<BloodSugarCustom> selectSugarPageGroup(@Param("customer") Customer customer, @Param("isAbnormal") Integer isAbnormal,
                                                @Param("start") String start, @Param("end") String end,
                                                @Param("mealtime") String mealtime,@Param("stationId")Integer stationId);

    List<BloodSugar> selectBloodSugarGraph(Integer customerId);

    List<IndexGraphDayResDTO> selectGraphWithDay(IndexReqDTO indexReqDTO);

    List<IndexGraphResDTO> selectGraphData(IndexReqDTO indexReqDTO);

    List<BloodSugar> selectCustomerSugar(String customerId, Integer scope,Integer partId);

    int updatePart(List ids, Integer partId);
}